package com.example.java2e.Service.Impl;

import com.example.java2e.Dao.RouteDao;
import com.example.java2e.Entity.Site;
import com.example.java2e.Service.RouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RouteServiceImpl implements RouteService {
    @Autowired
    private RouteDao routeDao;
    @Override
    public void add_route(long id_route,String name,long position){
        routeDao.add_route(id_route,name,position);
    }
    @Override
    public void delete_route(long id_route){
        routeDao.delete_route(id_route);
    }
    @Override
    public List<Long> check_route(){
       return routeDao.check_route();
    }
    @Override
    public List<Site>check_route_detail(long id_route){
        return routeDao.check_route_detail(id_route);
    }
    @Override
    public List<Site>search_route_keyword(String keyword){
        return routeDao.search_route_keyword(keyword);
    }
    @Override
    public Site search_site_by_name(String name){
        return routeDao.search_site_by_name(name);
    }
}
